#include <catch2/catch.hpp>

#include "solution.hpp"

using namespace solution_071;

TEST_CASE("071_simplify_path", "[071]") {
    CHECK(Solution().simplifyPath("/")                    == "/");
    CHECK(Solution().simplifyPath("/home/")               == "/home");
    CHECK(Solution().simplifyPath("/../")                 == "/");
    CHECK(Solution().simplifyPath("/home//foo/")          == "/home/foo");
    CHECK(Solution().simplifyPath("/home//foo")           == "/home/foo");
    CHECK(Solution().simplifyPath("/a/./b/../../c/")      == "/c");
    CHECK(Solution().simplifyPath("/a/./b/../../c")       == "/c");
    CHECK(Solution().simplifyPath("/a/../../b/../c//.//") == "/c");
}
